package org.jupiter.blog.api.convertor;

import org.jupiter.blog.api.domain.JupiterUserRole;
import org.jupiter.blog.api.dto.JupiterUserRoleDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

@Mapper(componentModel = "spring")
public interface JupiterUserRoleStructConvertor {

	@Mapping(target = "createTime", ignore = true)
	@Mapping(target = "updateTime", ignore = true)
	@Mapping(target = "roleUuid", ignore = true)
		// 因为 roleUuids 是列表，单条忽略
	JupiterUserRole toEntity(JupiterUserRoleDTO dto);

	JupiterUserRoleDTO toDto(JupiterUserRole entity);
}
